<template>
    <div>
      <div v-for="(ccc,index) in div1" :key="ccc" :class="['box',num==index?'box2':'']" @click="ck(ccc,index)" >{{ccc}}</div>
      <srrr :is="rs"></srrr>
     </div>
    </template>
    <script>
    import som from '@/components/som.vue'
    import som1 from '@/components/som1.vue'
    export default {
    data(){
    return{
      div1:['som','som1'],
      rs:'',
      isbox2:true,
      num:0
    }
    },
    components:{
      som,
      som1
    },
    created(){
    },
    computed:{
    },
    methods:{
      ck(ccc,index){
        this.num=index
       this.rs=ccc
       this.isbox2 = !this.isbox2
      }
    },
    }
    </script>
    <style scoped>
    .box{
      width: 100px;
      height: 100px;
      outline: 1px solid red;
      display: inline-block;
    }
    .box2{
      background-color:rgb(32, 40, 37);
       color: #f8f1f1ef;
    }
    </style>
    